<!--
 * @Author: wushuiqing
 * @Email: wsqsix@163.com
 * @Date: 2021-12-28 12:57:22
-->

<template>
  <div class="detail">
    <!-- 返回 -->
    <el-button type="text" @click="goBack" size="18">返回</el-button>

    <div class="myContent">
      <div class="header">
        <!-- 标题 -->
        <div class="title">
          {{ this.infoForm.title }}
        </div>
        <!-- 发布时间 -->
        <div class="pubTime">
          <span><strong>发布人:</strong
          >{{this.infoForm.realname}}</span>
          <span><strong>发布时间:</strong
          >{{
            moment(Number(this.infoForm.publishTime)).format(
              "YYYY-MM-DD"
            )
          }}</span>
        </div>
      </div>

      <div class="content" v-html="this.infoForm.content"></div>
    </div>
  </div>
</template>

<script>
let moment = require("moment");
import { get, post } from "@/utils/request";
import {mapActions} from 'vuex'
export default {
  // 组件名称
  name: "demo",
  // 组件参数 接收来自父组件的数据
  props: {},
  // 组件状态值
  data() {
    return {
      infoForm: {},
      baseUser:{},
      page:1,
      pageSize:200,
      readTimes:0
    };
  },

  computed: {
  },

  watch: {},

  methods: {
    ...mapActions('list', ['getListDataVuex']),
    moment,
    goBack() {
      this.$router.go(-1);
    },
  },

  created() {
    this.infoForm = this.$route.query; 
    // console.log(this.infoForm);
  },

  mounted() {},

  beforeDestroy() {},

  destroyed() {},
};
</script>

<style scoped>
.header {
  text-align: center;
  border-bottom: 1px solid #ededed;
}
.title {
  font-size: 20px;
  line-height: 2em;
}

.pubTime {
  color: #999;
  font-size: 12px;
  line-height: 2em;
}

.content {
  padding: 1em 0;
}

.myContent{
  padding: 60px;
}
</style>
